<?php

class Admin_Form_Faq extends Zend_Form {

    public function init() {
        $this->setMethod("post");

        #question
        $que = new Zend_Form_Element_Text('que');
        $que->setLabel("Enter Question:")
                ->setRequired()
                ->setAttribs(array('placeholder' => 'Enter question here...', 'class' => 'span12'))
                ->addFilter("StringTrim");

        #answer
        $ans = new Zend_Form_Element_Textarea('ans');
        $ans->setLabel("Enter Answer:")
                ->setRequired()
                ->setAttribs(array('placeholder' => 'Enter answere here...', 'class' => 'span12'))
                ->addFilter("StringTrim");

        #enabled
        $enabled = new Zend_Form_Element_Select('enabled');
        $enabled->setLabel("Enable/Visible this question?")
                ->addMultiOptions(array(
                    1 => "Enable/Visible",
                    0 => "Disable/Hidden"
        ));

        #id
        $id = new Zend_Form_Element_Hidden('id');
        $id->setValue(0);

        #submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Create Question")
                ->setAttribs(array('class' => 'btn btn-success'));

        #
        $this->addElements(array($que, $ans, $enabled, $id, $submit));
    }

}

